package persistence;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the Clients_has_Firm database table.
 * 
 */
@Entity
public class Clients_has_Firm implements Serializable {
	private static final long serialVersionUID = 1L;
	private Clients_has_FirmPK id;
	private String rate;
	private Client client;
	private Firm firm;

    public Clients_has_Firm() {
    }


	@EmbeddedId
	public Clients_has_FirmPK getId() {
		return this.id;
	}

	public void setId(Clients_has_FirmPK id) {
		this.id = id;
	}
	

	public String getRate() {
		return this.rate;
	}

	public void setRate(String rate) {
		this.rate = rate;
	}


	//bi-directional many-to-one association to Client
    @ManyToOne
	@JoinColumn(name="Clients_idClients",insertable=false,updatable=false)
	public Client getClient() {
		return this.client;
	}

	public void setClient(Client client) {
		this.client = client;
	}
	

	//bi-directional many-to-one association to Firm
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="Firm_crd", referencedColumnName="crd",insertable=false,updatable=false),
		@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm",insertable=false,updatable=false)
		})
	public Firm getFirm() {
		return this.firm;
	}

	public void setFirm(Firm firm) {
		this.firm = firm;
	}
	
}